<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>修改密码</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
    <link rel="stylesheet" type="text/css" href="UI/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="UI/css/main.css"/>
    <script type="text/javascript" src="UI/js/libs/modernizr.min.js"></script>
    <link href="UI/users/bootstrap/css/bootstrap.min.css" rel="stylesheet">
   	<script src="UI/users/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript">
function confirmPassword(){
	var newPassword=document.getElementById("newPassword");
	var ensurePassword=document.getElementById("ensurePassword");
	
	if(newPassword.value==ensurePassword.value){
		if(newPassword.value==""){
			newPassword.value="";
			ensurePassword.value="";
			alert("新密码不能输入为空!");
			return false;
		}else{
			return true;
		}
		
	}else{
//		alert("newPassword"+newPassword+"  "+ensurePassword);
		newPassword.value="";
		ensurePassword.value="";
		alert("两次密码不一致!");
		
		return false;
	}
}
</script>
  </head>
  
  <body>
<%-- 	  <div class="alert alert-warning">
		   <labeldata-dismiss="alert">
		     ${requestScope.msg}
		   </label>
		</div> --%>
	    <!--/sidebar-->
	    <s:if test="msg!=null">
	    	<script type="text/javascript">
	    		var message="${msg}";
	    		alert(message);
	    	</script>
	    </s:if>
        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i>
            <span class="crumb-name">首页</span><span class="crumb-step">&gt;</span>
            <span class="crumb-name">用户管理</span><span class="crumb-step">&gt;</span>
            <span>修改密码</span></div>
        </div>
        <div class="result-wrap">
            <div class="result-content">
                <form action="updatePassword" method="post" target="_parent" id="updatePasswordForm" name="updatePasswordForm" enctype="multipart/form-data" onsubmit="return confirmPassword()">
                    <table class="insert-tab" width="100%">
                        <tbody><tr>
                            <th width="120"><i class="require-red">*</i>账号：</th>
                            <td>
                                <s:textfield name="user.account" id="name" class="common-text required" type="text" size="50">
                             	</s:textfield>
                            </td>
                        </tr>
                            <tr>
                                <th><i class="require-red">*</i>用户名：</th>
                                <td>
                                	<s:textfield name="user.name" class="common-text required" size="50"></s:textfield>
                                </td>
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>原密码：</th>
                                <td><s:password class="common-text required" id="oldPassword" name="oldPassword" size="50"></s:password></td>
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>新密码：</th>
                                <td><s:password class="common-text required" id="newPassword" name="newPassword" size="50" ></s:password></td>
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>再次确认：</th>
                                <td><s:password class="common-text required" id="ensurePassword" name="ensurePassword" size="50" ></s:password></td>
                            </tr>
                            <tr>
                                <th></th>
                                <td>
                                    <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                                    <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                                </td>
                            </tr>
                        </tbody></table>
                </form>
            </div>
        </div>
    <!--/main-->
  </body>
</html>
